package com.lmc.orderservice.controller;

import com.lmc.orderservice.model.OrderInfo;
import com.lmc.orderservice.service.OrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RequestMapping("order")
@RestController
public class OrderController {
    @Autowired
    private OrderService orderService;

    @RequestMapping("selectOrderById")
    public OrderInfo selectOrderById(@RequestParam("orderId") Integer orderId){
        log.info("selectOrderById orderId:{}", orderId);
        return orderService.selectOrderById(orderId);
    }
}
